import request from '@/utils/request'

const product = {
  Directory: '/examdirectory/getExamDirectoryById',
  List: '/courseServiceManage/selectCourseServiceList',
  Add: '/courseServiceManage/insertCourseServiceManage',
  Deletes: '/courseServiceManage/deleteCourseServiceManage',
  Edit: '/courseServiceManage/updateCourseServiceManage',
  ViewInfo: '/courseServiceManage/selectCourseServiceInfo'
}

/**
 * @param parameter
 * @returns {*}
 */

// 课程目录
export function directory (parameter) {
  return request({
    url: product.Directory,
    method: 'post',
    data: parameter
  })
}

// 获取课程服务列表
export function list (parameter) {
  return request({
    url: product.List,
    method: 'post',
    data: parameter
  })
}

// 添加课程服务
export function add (parameter) {
  return request({
    url: product.Add,
    method: 'post',
    data: parameter
  })
}

// 删除课程服务
export function deletes (parameter) {
  return request({
    url: product.Deletes,
    method: 'post',
    data: parameter
  })
}

// 修改课程服务
export function edit (parameter) {
  return request({
    url: product.Edit,
    method: 'post',
    data: parameter
  })
}

// 查询课程服务信息
export function viewInfo (parameter) {
  return request({
    url: product.ViewInfo,
    method: 'post',
    data: parameter
  })
}
